package com.financing.wap.service.impl;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.financing.wap.dao.INewsDao;
import com.financing.wap.dto.MessageJpushDTO;
import com.financing.wap.dto.NewsDTO;
import com.financing.wap.dto.TagNewsDTO;
import com.financing.wap.dto.TagProductDTO;
import com.financing.wap.service.INewsService;
import com.financing.wap.vo.QueryNewsVo;
import com.financing.wap.vo.TagRelateVo;

@Service("newsService")
public class NewsServiceImpl implements INewsService{

	@Autowired
	private INewsDao newsDao;

	@Override
	public List<NewsDTO> getNewsList(QueryNewsVo queryVo) {
		 
		return newsDao.getNewsList(queryVo);
	}

	@Override
	public int getNewsListCount(QueryNewsVo queryVo) {
		 
		return newsDao.getNewsListCount(queryVo);
	}

	@Override
	public NewsDTO searchNewsById(Integer id) {
		 
		return newsDao.searchNewsById(id);
	}

	@Override
	public List<TagNewsDTO> getAboutNewsByPid(TagRelateVo  tagRelateVo) {
		return newsDao.getAboutNewsByPid(tagRelateVo);
	}

	@Override
	public Integer getAboutNewsByPidCount(TagRelateVo  tagRelateVo) {
		return newsDao.getAboutNewsByPidCount(tagRelateVo);
	}

	@Override
	public List<TagProductDTO> getAboutProductsByPid(TagRelateVo tagRelateVo) {
		return newsDao.getAboutProductsByPid(tagRelateVo);
	}

	@Override
	public Integer getAboutProductsByPidCount(TagRelateVo tagRelateVo) {
		return newsDao.getAboutProductsByPidCount(tagRelateVo);
	}

	@Override
	public List<TagProductDTO> getAboutTagProductsByPid(TagRelateVo tagRelateVo) {
		return newsDao.getAboutTagProductsByPid(tagRelateVo);
	}

	@Override
	public Integer getAboutTagProductsByPidCount(TagRelateVo tagRelateVo) {
		return newsDao.getAboutTagProductsByPidCount(tagRelateVo);
	}

	@Override
	public List<TagProductDTO> getAboutTagNewsByPid(TagRelateVo tagRelateVo) {
		return newsDao.getAboutTagNewsByPid(tagRelateVo);
	}

	@Override
	public Integer getAboutTagNewsByPidCount(TagRelateVo tagRelateVo) {
		return newsDao.getAboutTagNewsByPidCount(tagRelateVo);
	}

	@Override
	public Map<String, Object> getNewsUpdateDate(Map<String, Object> map) throws SQLException {
		return newsDao.getNewsUpdateDate(map);
	}

	@Override
	public void updateLastDate(Map<String, Object> parMap) {
		newsDao.updateLastDate(parMap);
	}

	@Override
	public Map<String, Object> getJPushListUpdateDate(Map<String, Object> paramMap) throws SQLException  {
		return newsDao.getJPushListUpdateDate(paramMap);
	}

	@Override
	public Map<String, Object> getJPushListShopUpdateDate(Map<String, Object> paramMap) throws SQLException  {
		return newsDao.getJPushListShopUpdateDate(paramMap);
	}

	@Override
	public void updateLastJPushListDate(Map<String, Object> parMap) {
		newsDao.updateLastJPushListDate(parMap);
	}

	@Override
	public void updateLastJPushListShopDate(Map<String, Object> parMap) {
		newsDao.updateLastJPushListShopDate(parMap);
	}

	@Override
	public List<MessageJpushDTO> getJPushList(QueryNewsVo queryVo) {
		return newsDao.getJPushList(queryVo);
	}
	@Override
	public int getJPushListCount(QueryNewsVo queryVo) {

		return newsDao.getJPushListCount(queryVo);
	}

	@Override
	public List<MessageJpushDTO> getJPushListShop(QueryNewsVo queryVo) {
		return newsDao.getJPushListShop(queryVo);
	}
	@Override
	public int getJPushListShopCount(QueryNewsVo queryVo) {

		return newsDao.getJPushListShopCount(queryVo);
	}
}
